from rest_framework_jwt.serializers import JSONWebTokenSerializer
from rest_framework import serializers

from user.models import *


class UserBackendLoginTokenSerializer(JSONWebTokenSerializer):
    @property
    def username_field(self):
        return "phone"


class UserBackendSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = '__all__'

